//
//  XPBannerCell.swift
//  MTInternational
//
//  Created by xiaopin on 2020/12/3.
//  Copyright © 2020 scoresdata.net. All rights reserved.
//

import UIKit

class XPBannerCell: UICollectionViewCell {
    let bgImage = UIImageView.aspectFillImageView()
    let titleBG = UIImageView.init()
    let titleLabel = UILabel.init(15.scale, weight: .medium, textColor: .white)
    
    override init(frame: CGRect) {
        super.init(frame:frame)
        backgroundColor = pp_color(.CFFFFFF)
        contentView.backgroundColor = pp_color(.CFFFFFF)
        
        bgImage.image = UIImage(named: "default_rectangle")
        titleBG.image = UIImage(named: "bg_aphla_bottom")
        titleLabel.numberOfLines = 2
        
        bgImage.beAddInto(contentView).snp.makeConstraints { m in
            m.top.width.height.bottom.equalToSuperview()
        }
        titleBG.beAddInto(contentView).snp.makeConstraints { m in
            m.left.right.bottom.equalToSuperview()
            m.height.equalTo(60.scale)
        }
        titleLabel.beAddInto(contentView).snp.makeConstraints { m in
            m.left.equalTo(15.scale)
            m.right.equalTo(-15.scale)
            m.bottom.equalTo(-15.scale)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
